<?php require_once('Connections/elevate954.php'); ?>
<?php
include_once('functions.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$colname_PAGES = "-1";
if (isset($_GET['pages_id'])) {
  $colname_PAGES = $_GET['pages_id'];
}
mysql_select_db($database_elevate954, $elevate954);
$query_PAGES = sprintf("SELECT * FROM pages WHERE pages_id = %s", GetSQLValueString($colname_PAGES, "int"));
$PAGES = mysql_query($query_PAGES, $elevate954) or die(mysql_error());
$row_PAGES = mysql_fetch_assoc($PAGES);
$totalRows_PAGES = mysql_num_rows($PAGES);

mysql_select_db($database_elevate954, $elevate954);
$query_featured_pages = "SELECT * FROM featured_programs";
$featured_pages = mysql_query($query_featured_pages, $elevate954) or die(mysql_error());
$row_featured_pages = mysql_fetch_assoc($featured_pages);
$totalRows_featured_pages = mysql_num_rows($featured_pages);

require_once 'social-buffs/functions.php';
?>
<?php
mysql_select_db($database_elevate954, $elevate954);
$query_NEWS = "SELECT * FROM MEMBERS_NEWS_AREA";
$NEWS = mysql_query($query_NEWS, $elevate954) or die(mysql_error());
$row_NEWS = mysql_fetch_assoc($NEWS);
$totalRows_NEWS = mysql_num_rows($NEWS);
?>
<?php
 include("Connections/elevate954.php");
 ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>ELEVATE954 | Health &amp; Fitness</title>
<style type="text/css">@import url("http://fonts.googleapis.com/css?family=PT+Sans");</style>
<style type="text/css">@import url("http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz");</style>
<style type="text/css">@import url("http://fonts.googleapis.com/css?family=Vollkorn");</style>
<style type="text/css">@import url("css/reset.css");</style>
<style type="text/css">@import url("css/grid.css");</style>
<style type="text/css">@import url("css/styles.css");</style>
<style type="text/css">@import url("css/tabs.css");</style>
<!--Common jQuery-->
<script type="text/javascript" src="social-buffs/js/jquery.js"></script>
<!--<script src="js/jquery-1.6.2.min.js" type="text/javascript"></script>-->
<link rel="stylesheet" href="social-buffs/css/style.css" />

<script type="text/javascript" src="social-buffs/js/jtipsy.js"></script>
<script type="text/javascript" src="social-buffs/js/script.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<!--Coda Slider-->
<style type="text/css">@import url("css/coda-slider-2.0.css");</style>
<!--CSS Switcher-->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<!--Flickr Feed-->
<script type="text/javascript" src="js/jflickrfeed.min.js"></script>
<script type="text/javascript" src="js/setup.js"></script>
<!--Parallax-->
<style type="text/css">@import url("layerslider/css/layerslider.css");</style>
<style type="text/css">@import url("css/parallax.css");</style>
<script src="layerslider/js/layerslider.kreaturamedia.jquery.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$('#layerslider').layerSlider({
		    navPrevNext : true,
			navButtons : false,
    		navStartStop : false,
			animateFirstLayer : true,
			skinsPath : 'layerslider/skins/'
		});
	});		
</script>
<!--Toggle-->
<style type="text/css">@import url("css/toggle.css");</style>
<script type="text/javascript" src="js/expand.js"></script>
<!--Scroll Top-->
<script type="text/javascript" src="js/scroll.js"></script>
<!--Pretty Photo-->
<style type="text/css">@import url("css/prettyPhoto.css");</style>
<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<!--Quicksand-->
<script type='text/javascript' language='Javascript' src='js/jquery.quicksand.js'></script>
<!--Nivo-->
<style type="text/css">@import url("css/nivo-slider.css");</style>
<script type='text/javascript' src='js/jquery.nivo.slider.js'></script>
<script type='text/javascript'>
$(window).load(function() {
    $('#slider').nivoSlider();
    });
</script>
<!--Background-->
<script type="text/javascript" src="js/jquery.fullbg.min.js"></script>
<!--New Menu-->
<style type="text/css">@import url("css/menu.css");</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript" src="js/menu.js"></script>

<style type="text/css">
ul.tsc_pagination { margin:4px 0; padding:0px; height:100%; overflow:hidden; font:12px; list-style-type:none; }
ul.tsc_pagination li { float:left; margin:0px; padding:0px; margin-left:5px; }
ul.tsc_pagination li:first-child { margin-left:0px; }
ul.tsc_pagination li a { color:#000000; display:block; text-decoration:none; padding:7px 10px 7px 10px; }
ul.tsc_pagination li a img { border:none; }
ul.tsc_paginationC li a { color:#000000; background:#FFFFFF; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; border:solid 1px #F1F1F1; padding:6px 9px 6px 9px; }
ul.tsc_paginationC li { padding-bottom:1px; }
ul.tsc_paginationC li a:hover,
ul.tsc_paginationC li a.current { color:#FFFFFF; box-shadow:0px 1px #F1F1F1; -moz-box-shadow:0px 1px #F1F1F1; -webkit-box-shadow:0px 1px #F1F1F1; }
ul.tsc_paginationC01 li a:hover,
ul.tsc_paginationC01 li a.current { color:#FFFFFF; text-shadow:0px 1px #EEEEEE; border-color:#F1F1F1; background:#08AB0F; background:-moz-linear-gradient(top, #FFFFFF 1px, #08AB0F 1px, #08AB0F); background:-webkit-gradient(linear, 0 0, 0 100%, color-stop(0.02, #FFFFFF), color-stop(0.02, #08AB0F), color-stop(1, #08AB0F)); }
ul.tsc_paginationC li a.In-active {
   pointer-events: none;
   cursor: default;
}
</style>

<script type="text/javascript">
function changePagination(pageId,liId,filterCat){
     $(".flash").show();
     $(".flash").fadeIn(400).html
                ('Loading <img src="images/ajax-loader12.gif" />');
     var dataString = 'pageId='+pageId+'&filterCat='+filterCat;
     $.ajax({
           type: "POST",
           url: "load-gallery.php",
		   dataType: "json",
           data: dataString,
           cache: false,
           success: function(result){
                 $(".flash").hide();
                 $(".link a").each(function(index, element) {
                   $(this).removeClass("In-active current") ; 
                 });
                 $("a."+liId).each(function(index, element) {
                   $(this).addClass( "In-active current" ); 
                 });
                 $("#galleryContainer").html(result[0]);
				 
				 hover_overlay();
				 $("a[rel^='prettyPhoto']").prettyPhoto({
					animation_speed: 'fast',
					slideshow: 5000,
					autoplay_slideshow: false,
					opacity: 0.50,
					show_title: true,
					allow_resize: true,
					default_width: 500,
					default_height: 344,
					counter_separator_label: '/',
					theme: 'light_square',
					horizontal_padding: 20,
					hideflash: false,
					wmode: 'opaque',
					autoplay: true,
					modal: false,
					deeplinking: false,
					overlay_gallery: true,
					keyboard_shortcuts: true,
					changepicturecallback: function(){},
					callback: function(){},
					ie6_fallback: true
				});
           }
      });
}
</script>
<style>
.social-buffs .sb-icon { opacity:0.5; }
.social-buffs .sb-icon:hover { opacity:1; }
</style>
<link href="assets/buttons/social-buttons.css" type="text/css" rel="stylesheet">
</head>

<body>
<!--<img src="images/backgrounds/image1.jpg" alt="" id="background" />-->
<div id="maincontent">

<!--Top Nav-->
<div class="bar">
	<div class="container_12">

		<div class="grid_6">
			<div class="mininav">
            	<ul>
            		<li><a href="index.php" class="fade">Home</a></li>            	
                	<li><a href="directions.php" class="fade">Direction</a></li>
                    <li><a href="contact.php" class="fade">Contact Us</a></li>
                    <li><a href="members/login.php" class="button dark small">Members Login</a></li>
            	</ul>
			</div>
		</div>
        
        <div class="grid_6 alignrightnopad">
        <!--Social Networks-->
        <div class="socialbar">
		<?php
$url = $_SERVER["SERVER_NAME"]. $_SERVER['REQUEST_URI'];
echo social_icons($url);
?>                          
        </div>
        <!--End Social Networks-->         
        </div>          
        
	</div>
</div>
<!--End Top Nav-->

<!--Start Box-->
<div class="box">
<a name="top" id="top"></a>

<!--Main Bar-->
<div class="container_12 navbar">
	<!--Logo-->
	<div class="grid_3_no_margin"><a href="index.php"><img src="White_Transparent.png" alt="" width="200" class="logo"/></a></div>
	<!--End Logo-->
<!--Main Nav--> 
	<div class="grid_9_no_margin">

			<div id="menu">
				<ul>
                <li class="icon_drop"><a href="/">HOME</a></li>
               
                <?php
				$get_menu = "select * from menu_cat order by SORT_ORDER";
				$res_menu = mysql_query($get_menu) or die(mysql_error());
				while($row_menu = mysql_fetch_array($res_menu))
				{
					 $check_sub = "select * from submenu_cat where menu_id = ".$row_menu['menu_id']." order by SORT_ORDER";
					 $res_sub = mysql_query($check_sub);
					 $sub = mysql_num_rows($res_sub);
						if($sub > 0)
						{
							$class = "icon_drop";	
						}
						else
						{
							$class = "";	
						}
					
					// code for checking the redirection yes or no on main menu
					if($row_menu['REDIRECT_STATUS'] == "YES")
					{
					$href= $row_menu['REDIRECT_ADDRESS'];	
					}
					else
					{
					$href="pages.php?pages_id=".$row_menu['pages_id']."";	
					}
				 
				?>
                
					<li class="<?php echo $class;?>">
                    		<a href="<?php echo $href;?>"><?php echo ucwords($row_menu['NAME']);?></a>
                        
                      <?php
					  if($sub > 0)
						{
										
					  ?> 
                            
                    	 <ul>
                         <?php 
						 while($row_submenu = mysql_fetch_array($res_sub))
						 {
							// code for checking the redirection yes or no on sub menu
						if($row_submenu['REDIRECT_STATUS'] == "YES")
						{
						$sub_href = $row_submenu['WEB_REDIRECT'];	
						}
						else if($row_submenu['REDIRECT_STATUS'] == "NO")
						{
						$sub_href = "pages.php?pages_id=".$row_submenu['pages_id']."";	
						} 
							 
							 
						 ?>
                            <li><a href="<?php echo $sub_href;?>">
							<?php echo ucwords($row_submenu['SUB_MENU_NAME'])?></a></li>
						<?php } ?>	
                        </ul>
                        
                     <?php } ?>   
                    </li>                   
                 <?php } ?>    
				</ul>
			</div>  
	</div>
    <!--End Main Nav--> 
</div>
<!--End Main Bar-->
</div>
<!--End Box-->

<!--Start Box-->
<div class="box"><div class="clearsmall"></div>
    
<div class="headertext">FITNESS GALLERY</div><br />
<br />
<p>
<div class="container_12">
               <?php  $image_cnt = "select * from GALLERY";
							$res_image_cnt = mysql_query($image_cnt);
							$count_gallery=mysql_num_rows($res_image_cnt);
							$content = '';
							if($count_gallery > 0){
								  $paginationCount=getPagination($count_gallery);
							}
							
							if($count_gallery > 0){
							$content .='<ul class="tsc_pagination tsc_paginationC tsc_paginationC01">';
								/*<li class="first link" id="first">
									<a  href="javascript:void(0)" onclick="changePagination(\'0\',\'first\',0)">F i r s t</a>
								</li>';*/
								for($i=0;$i<$paginationCount;$i++){
							 		if($i == 0){ $sel = 'current'; }else{ $sel = ''; }
									$content .='<li id="'.$i.'_no" class="link">
									  <a class="'.$sel.' '.$i.'_no" href="javascript:void(0)" onclick="changePagination(\''.$i.'\',\''.$i.'_no\',0)">
										  '.($i+1).'
									  </a>
								</li>';
								}
							 
								/*'<li class="last link" id="last">
									 <a href="javascript:void(0)" 
									 onclick="changePagination(\''.($paginationCount-1).'\',\'last\',0)">L a s t</a>
								</li>*/
								$content .='<li class="flash"></li>
							</ul>';
							}	
							
							echo '<div id="pagingDiv" >'.$content.'</div>'; ?>
                <!--Portfolio Navigation-->
                <div class="grid_12">
                    <ul class="splitter portfolio-main filter">
                        <li>
                            <ul>
                             <li class="segment-1 selected-1 active"><a href="#" tabFilter="0" class="all">All</a></li>
                            <?php
							//code for fetching gallery category
							
							$get_gallery_cat = "select * from GALLERY_CAT order by SORT_ORDER";
							$res_gallery_cat = mysql_query($get_gallery_cat);
							$c=1;
							while($row_gallery_cat = mysql_fetch_array($res_gallery_cat))
							{ 
								$c++;
							?>
                                <li class="segment-<?php echo $c; ?>">
                                <a href="#" tabFilter="<?php echo $row_gallery_cat['GALLERY_CAT_ID'];?>" class="<?php echo str_replace(' ','_',$row_gallery_cat['CATEGORY_NAME']);?>"><?php echo $row_gallery_cat['CATEGORY_NAME'];?></a></li>
                                 
                            
							<?php } ?>    
                                
                                
                                
                            </ul>
                        </li>
                    </ul>
                 </div>
                    
                 <!--Portfolio Thumbnails-->
                 
                            
                 <div id="galleryContainer" class="grid_12_no_margin">
                 
                    <ul id="list" class="image-grid threecol portfolio-content">
                           
                             <?php
						$get_image = "select * from GALLERY order by CATEGORY_ID,gallery_id desc limit 0,".PAGE_PER_NO;
						$res_image = mysql_query($get_image);
						$c=0;$lastCat=-1;
						while($row_image = mysql_fetch_array($res_image))
						{
							if($row_image['CATEGORY_ID'] != $lastCat){
								$get_gallery_cat = "select * from GALLERY_CAT where GALLERY_CAT_ID=".$row_image['CATEGORY_ID'];
								$res_gallery_cat = mysql_query($get_gallery_cat);
								$row_gallery_cat = mysql_fetch_array($res_gallery_cat);
								$c++;
							}
							
							$lastCat = $row_image['CATEGORY_ID'];
						?>
                        	
                    	<!--Gallery Thumbnail-->                        
                        <li data-id="<?php echo $c;?>" data-type="<?php echo str_replace(' ','_',$row_gallery_cat['CATEGORY_NAME']);?>">
                        
                       
                            
                            <?php
							if($row_image['MEDIA_TYPE'] == "slider")
							{							
							?>
                            <div class="hover_slideshow">
                            <a href="/image_uploads/<?php echo $row_image['MEDIA_FILE'];?>" rel="prettyPhoto[project1]" title="<?php echo $row_image['IMAGE_NAME'];?>"><img src="/image_uploads/<?php echo $row_image['THUMBNAIL_IMAGE'];?>" alt="" width="290" height="180"/></a>
                             
                            </div>
                            <div class="text_box">
                            	<h4><?php echo $row_image['DESCRIPTION'];?></h4>
                            	<p><?php echo $row_image['IMAGE_NAME'];?></p>
                            </div>
                            <?php } 
							else if($row_image['MEDIA_TYPE'] == "video")
							{							
							?>
                                                        
                             <div class="hover_video">
                            <a href="<?php echo $row_image['VIDEO_LINK'];?>" rel="prettyPhoto" title="<?php echo $row_image['IMAGE_NAME'];?>">
                            <img src="/image_uploads/<?php echo $row_image['MEDIA_FILE'];?>" alt="" width="290" height="180"/></a>
                            </div>
                            <div class="text_box">
                            	<h4><?php echo $row_image['DESCRIPTION'];?></h4>
                            	<p><?php echo $row_image['IMAGE_NAME'];?></p>
                            </div>
                            <?php } 
							else if($row_image['MEDIA_TYPE'] == "image")
							{							
							?>
                            
                             <div class="hover_image">
                            <a href="/image_uploads/<?php echo $row_image['MEDIA_FILE'];?>" rel="prettyPhoto" title="A single image">
                            <img src="/image_uploads/<?php echo $row_image['THUMBNAIL_IMAGE'];?>" alt="" width="290" height="160"/></a>
                            </div> 
                            <div class="text_box">
                            	<h4><?php echo $row_image['DESCRIPTION'];?></h4>
                            	<p><?php echo $row_image['IMAGE_NAME'];?></p>
                            </div>
                            
                            
                      <?php } ?>      
                            
                           

                            
                            
                        </li>
                        <!--End Gallery Thumbnail-->
						<?php } ?>

						
                         
                    </ul>
                  <!--End Gallery-->    
				  </div>   
                  
                  
<?php echo '<div id="pagingDivLow" style="clear: both;" >'.$content.'</div>'; ?>
</div>
</p>
                         

<div class="container_12">
	<div class="grid_12 nomargin">

               
    </div>
    <div class="clearnospacing"></div>
</div>

<div class="divider">
</div>

</div>
<!--End Box-->

<!--Featured Projects-->
<div class="centerbar">
  <div class="clearnospacing"></div>
</div>
<!--End Featured Projects-->

<!--Page Callout Section-->
    	<div class="calloutcontainer">
  				<div class="text">ELEVATE954 - FITNESS FOR LIFE</div>
                <div class="sub color">ZERO DOWN - ONLY $19.99 A MONTH FOR 3 MONTHS</div>
                <p>*Limited time offer. now at Elevate954 when you signup and recomment one of your friends to join our fitness revolution get one month free with each signup... Valid now through 09-10-2012</p>
    	</div>
<!--End Page Callout Section--> 

<!--Footer-->
<div class="footer">
    <div class="footer_container">       
        
     			<div class="footer1">
        			<h4>COMPANY</h4>
       				<div class="clear"></div>           
					<p>Our mission at Elevate is to improve the quality of life for our clients. We provide professional athletic training to world class athletes and take that same approach and apply it to all of our clients at Elevate. Whether it is thru Weight-Loss, Performance Training, or just trying to maintain a healthy  lifestyle, our staff at Elevate is here to assist you achieve your goals. </p>                          
        		</div>      
     			<div class="footer2">
        			<h4>RECENT NEWS</h4>
       			  <div class="clear"></div>
            		<!--Flickr-->
					<ul>
                      <?php do { ?>
                        <div class="NEWS_BOTTOM_LINKS" id="NEWS_BOTTOM_LINKS"><li><a href="elevate_news.php"><?php echo $row_NEWS['ARTICLE_NAME']; ?></a></li></div><br />
                        <?php } while ($row_NEWS = mysql_fetch_assoc($NEWS)); ?>
                      <br />

            		<a href="elevate_news.php" target="_self" class="button highlight action" id="WERWERW">READ MORE</a>
   			      </ul>
                  
	  </div>                
     			<div class="footer3">
        			<h4>Elevate Training & Fitness INFO</h4>
       				<div class="clear"></div>            
        			<p class="highlight"><span class="phone"> 954.530.2328</span></p>
           	 		<p class="highlight"><span class="email bold"> <a href="mailto:info@elevate954.com">info@elevate954.com</a></span></p>
            		<p class="highlight"><span class="mail">3400 SW 26 Terrace
Bay a2<br />
Fort Lauderdale Florida 33312</span></p> 
         		</div>        
     			<div class="footer4">                
    				<h4>CONTACT US</h4>
        			<div class="clear"></div>           
					<!--Form--> 
        			<iframe src='contactfooter/contactform.php' frameborder='0'
					width='222' height='200' marginwidth="0" scrolling="no"></iframe>
       				<!--End Form-->
        		</div>
        
    <div class="clearnospacing"></div>
    </div>
</div>

<!--Copyright Section-->
<div class="bottombar">
    <div class="bottombar_container">
    
        <div class="copyright">&copy; ELEVATE954. All Rights Reserved. Design by <a href="#" class="bold">SOLIS COMPUTER CONSULTANTS</a></div>
        
        <div class="bottom_nav">
            <!--<div class="crumb_navigation">
            	<ul>
		    		<li><a href="index.html" class="fade">HOME</a></li>
		    		<li><a href="about.html" class="fade">ABOUT US</a></li>
		   			<li><a href="services.html" class="fade">GALLERIES</a></li>
                 	<li><a href="gallery1.html" class="fade">TRAINING</a></li>
                    <li><a href="blog.html" class="fade">MEMBERSHIP</a></li>
                    <li><a href="contact.html" class="fade">SCHEDULE</a></li>
                    <li><a href="contact.html" class="fade">ONLINE STORE</a></li>
                </ul>
			</div>
        </div>-->
        
        <p><a href="#top" id="top-link"></a></p> 
        
    </div>   
</div>
<!--END Copyright Section-->
<!--End Footer-->

<script type="text/javascript" src="js/custom_filter.js"></script>

<!--Tool Tip-->
<script type="text/javascript">
var tip = $();
$(document).ready(function() {
    //Tooltips
    $(".tip_trigger").hover(function(){
        tip = $(this).find('.tip');
        tip.show(); //Show tooltip
    }, function() {
        tip.hide(); //Hide tooltip
    }).mousemove(function(e) {
        var mousex = e.pageX + 20; //Get X coodrinates
        var mousey = e.pageY + 20; //Get Y coordinates
        var tipWidth = tip.width(); //Find width of tooltip
        var tipHeight = tip.height(); //Find height of tooltip

        //Distance of element from the right edge of viewport
        var tipVisX = $(window).width() - (mousex + tipWidth);
        //Distance of element from the bottom of viewport
        var tipVisY = $(window).height() - (mousey + tipHeight);

        //Absolute position the tooltip according to mouse position
        tip.css({  top: mousey, left: mousex });
    });
});
</script>

<!--Tabs-->


<!--Toggle-->
<script type="text/javascript">
$(function() {
    $(".expand").toggler({initShow: "div.collapse:first", method: "slideFadeToggle"});
    // --- Other options:
    //$(".expand").toggler({method: "toggle", speed: 0});
    //$(".expand").toggler({method: "toggle"});
    //$(".expand").toggler({speed: "fast"});
    //$(".expand").toggler({method: "fadeToggle"});
    //$(".expand").toggler({method: "slideFadeToggle"});    
    $("#content").expandAll({trigger: ".expand", ref: "div.demo",  speed: 600, oneSwitch: false});
});
</script>

<!--Coda Slider-->
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.coda-slider-2.0.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('#coda-slider-1').codaSlider();
	});
</script> 

</body></html>
<?php
mysql_free_result($PAGES);

mysql_free_result($featured_pages);

mysql_free_result($NEWS);
?>
